import type { ListDataSimpleI, ListDataI, ListParams } from '@/types'
import type { PropertyI } from '@/types/property'
import { http } from '@/utils/reuqest'
/**
 * 查看物业费列表
 */
export const propertyGetList = (params: ListParams) => {
  return http.get<ListDataI<PropertyI>>('park/propertyfee', params)
}
/**
 * 添加账单
 */
export const propertyAddApi = (data: PropertyI) => {
  return http.post<null>('park/propertyfee', data)
}
/**
 * 编辑账单
 */
export const propertyEditApi = (data: PropertyI) => {
  return http.put<null>('park/propertyfee', data)
}
/**
 * 删除账单
 */
export const propertyDelApi = (id: number) => {
  return http.delete<null>(`park/propertyfee/${id}`)
}
/**
 * 查询所有楼宇
 */
export const propertyGetBuildListApi = () => {
  return http.get<ListDataSimpleI[]>('park/all/building')
}
/**
 * 查询所有企业
 */
export const propertyGetEnListApi = () => {
  return http.get<ListDataSimpleI[]>('park/all/enterprise')
}
